home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 May & June / Amiga-CD 1996 #5-6.iso / demos / finaldata / fdmacros / fromabove < prev    next >
Text File  |  1996-03-22  |  622b  |  29 lines

  1. /* ----------------------------------- */
  2. /* Final Data ARexx Macro.             */
  3. /* Repeat data from the cell above.    */
  4. /* $VER: RepeatAboveCell 1.0 (21.6.94) */
  5. /* ----------------------------------- */
  6. OPTIONS RESULTS
  7.  
  8. SelectionInfo
  9.  
  10. PARSE VAR RESULT selType selCol selRow selBeg selEnd
  11.  
  12. IF ( (selType = 'CELL') & (selRow > 1) ) THEN DO
  13.  
  14.     /* Clear out any present data */
  15.     CurrentCellData
  16.     len = LENGTH(RESULT)
  17.     IF    ( len > 0 ) THEN DO
  18.         SetCaret FROM 0 TO len
  19.         Delete
  20.         END
  21.  
  22.     /* Get the data from the above cell */
  23.     CellData selCol selRow-1 EDITFORMAT
  24.     data = RESULT
  25.  
  26.     /* Put in the new data */
  27.     Insert data
  28.  
  29.     END